package com.kakalog.main.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kakalog.main.entity.RingChartData;
import com.kakalog.main.entity.RingChartValueData;
import com.kakalog.main.entity.SysDetail;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 详情管理 服务类
 * </p>
 *
 * @author hzw
 * @since 2023-12-03
 */
@Service
public interface SysDetailService extends IService<SysDetail> {
    Iterable<SysDetail> getAllDetails();

    SysDetail getDetails(String did);

    List<SysDetail> getDetailsbyoid(String oid);

    Iterable<SysDetail> getDetailByoidandkind(String oid, String kind);

    Iterable<SysDetail> getDetailByresultandkind(String result, String kind);

    Iterable<SysDetail> getDetailByresultandkind1(String result, String kind);

    Iterable<SysDetail> getDetailByresultandkind2(String result, String kind);

    Iterable<SysDetail> getDetailByresultandkind3(String result, String kind);

    Iterable<SysDetail> getDetailBykind0(String result);

    void deleteDetail(String did);

    void updateDetail(SysDetail sysDetail);

    void addDetails(Long uid, Long timestamp, Long pid, String name, Integer quantity, Integer caloricSum, Integer delFlag, Integer kind, String specification, String info);

    String selectDateSumByUidAndDate(Long uid, String date);

    int selectCountDayByUid(Long uid);

    int selectCountOrderByUid(Long uid);

    String selectCountCaloricByUid(Long uid);

    void updateDel(String did);

    //后来添加：根据uid获得所有details
    List<SysDetail> selectAllDetailsByUid(Long uid);

    //    查询uid与指定data的消费
    List<RingChartData> selectDateSumByUidAndDatetoChart(Long Uid, String date);

    //查询收入环形表
    List<RingChartValueData> selectShouRuRingData(String start_date, String end_date, Long uid);
    //查询支出环形表
    List<RingChartValueData> selectZhiChuRingData(String start_date, String end_date, Long uid);

    //   按月份查询总体消费消费
    String selectDateSumByUidAndMonthDate(Long uid,String date);
    //    查询指定年的总收入
    String selectDateSumByUidAndMonthDateShouRu(Long uid,String date);
    //    查询指定年的总支出
    String selectDateSumByUidAndMonthDateZhiChu(Long uid,String date);

    String selectShouRuByUidAndDate(Long uid, String date);

    String selectZhiChuByUidAndDate(Long uid, String date);

    String selectZhiChuData(String start_date, String end_date, Long uid);

    String selectShouRuData(String start_date, String end_date, Long uid);

    String selectDateSumByUidAndMonthDateS(Long uid, String date);

    String selectDateSumByUidAndMonthDateZ(Long uid, String date);

    List<SysDetail> selike(Long uid, String name, String caloricSum, String date);
}
